package org.example.service;

import org.springframework.ai.model.function.FunctionCallback;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FunctionRegistry {

    @Bean
    public FunctionCallback askForLeaveCallback() {
        return FunctionCallback
                .builder()
                .function("askForLeave", new OaService())
                .description("当有人请假时，返回请假天数")
                .inputType(OaService.Request.class)
                .build();
    }

    @Bean
    public FunctionCallback fiveCodeCallback() {
        return FunctionCallback
                .builder()
                .function("fiveCode", new FiveCodeService())
                .description("根据入参的编码之一，查询其他五码信息")
                .inputType(FiveCodeService.Request.class)
                .build();
    }


}
